'''
Created on Mar 20, 2013

@author: jason.richmond
'''

from SimPy.Simulation import *
from UserModel import UserModel
from Packet import *
from Server import Server
from Globals import *
import sys

def main():
    UserModel.CreationRate = float(2.5)
    Server.SrvRate = float(2.5)    
    initialize()
    myServer = Server()
    
    activate(myServer, myServer.Run())
    Users = UserModel()
    activate(Users, Users.Run())
    MaxSimTime = float(5)
    simulate(until=MaxSimTime)
    print 'done'
    '''    
    Users = UserModel()
    activate(Users,Users.Run())
    MaxSimtime = float(5)
    simulate(until=MaxSimtime)
    
    print '% of Telnet Packets'
    print TelnetPacket.TotalTelnetJobs/Packet.TotalPackets
    '''
    
if __name__ == '__main__': main()
    
    
    
